import request from "@/utils/request";

// 查询
export function InfoTicket(query) {
  return request({
    url: "/ticket/data",
    method: "post",
    data: query,
  });
}

export function listTicket(query) {
  return request({
    url: "/ticket/list",
    method: "post",
    data: query,
  });
}

// 提交
export function addTicke(data) {
  return request({
    url: "/ticket/report",
    method: "post",
    data: data,
  });
}

// 查询卡片
export function queryCardTicke(data) {
  return request({
    url: "/ticket/card",
    method: "post",
    data: data,
  });
}

// 提交卡
export function addCardTicke(data) {
  return request({
    url: "/ticket/reportCard",
    method: "post",
    data: data,
  });
}

// 汇总  入口
export function enTrafficList(data) {
  return request({
    url: "/statistics/enTrafficList",
    method: "post",
    data: data,
  });
}

// 汇总  出口通行费
export function feeList(data) {
  return request({
    url: "/statistics/feeList",
    method: "post",
    data: data,
  });
}

// 汇总  出口通行量
export function exTrafficList(data) {
  return request({
    url: "/statistics/exTrafficList",
    method: "post",
    data: data,
  });
}
// 汇总  鲜活农产品
export function agricultural(data) {
  return request({
    url: "/statistics/agricultural",
    method: "post",
    data: data,
  });
}

// 上报情况
export function getReportSituation(data) {
  return request({
    url: "/statistics/reportSituation",
    method: "post",
    data: data,
  });
}

// 收费站级入口通行量统计
export function stationEnTrafficList(data) {
  return request({
    url: "/statistics/stationEnTrafficList",
    method: "get",
    params: data,
  });
}

// 收费站级出口通行量统计
export function stationExTrafficList(data) {
  return request({
    url: "/statistics/stationExTrafficList",
    method: "get",
    params: data,
  });
}

// 收费站级出口通行费统计
export function stationFeeList(data) {
  return request({
    url: "/statistics/stationFeeList",
    method: "get",
    params: data,
  });
}




// 登记

//   查询非正常CPC卡清卡登记列表
export function selectTbTicketClearList(query) {
  return request({
    url: "/signIn/selectTbTicketClearList",
    method: "get",
    params: query
  });
}

//     新增非正常CPC卡清卡登记
export function insertTbTicketClear(data) {
  return request({
    url: "/signIn/insertTbTicketClear",
    method: "post",
    data: data,
  });
}
//   修改非正常CPC卡清卡登记
export function updateTbTicketClear(data) {
  return request({
    url: "/signIn/updateTbTicketClear",
    method: "post",
    data: data,
  });
}
// 删除非正常CPC卡清卡登记
export function deleteTbTicketClearById(data) {
  return request({
    url: `/signIn/deleteTbTicketClearById/${data.id}`,
    method: "delete",
  });
}


// 查询无CPC卡车辆统计列表
export function selectTbTicketLoseCpcList(query) {
  return request({
    url: "/signIn/selectTbTicketLoseCpcList",
    method: "get",
    params: query
  });
}

//    新增无CPC卡车辆统计
export function insertTbTicketLoseCpc(data) {
  return request({
    url: "/signIn/insertTbTicketLoseCpc",
    method: "post",
    data: data,
  });
}
//   修改无CPC卡车辆统计
export function updateTbTicketLoseCpc(data) {
  return request({
    url: "/signIn/updateTbTicketLoseCpc",
    method: "post",
    data: data,
  });
}
// 删除无CPC卡车辆统计
export function deleteTbTicketLoseCpcById(data) {
  return request({
    url: `/signIn/deleteTbTicketLoseCpcById/${data.id}`,
    method: "delete",
  });
}


// 查询微机票使用情况登记列表
export function selectTbTicketMicrocomputerList(query) {
  return request({
    url: "/signIn/selectTbTicketMicrocomputerList",
    method: "get",
    params: query
  });
}

//    新增微机票使用情况登记
export function insertTbTicketMicrocomputer(data) {
  return request({
    url: "/signIn/insertTbTicketMicrocomputer",
    method: "post",
    data: data,
  });
}
//   修改微机票使用情况登记
export function updateTbTicketMicrocomputer(data) {
  return request({
    url: "/signIn/updateTbTicketMicrocomputer",
    method: "post",
    data: data,
  });
}
// 删除微机票使用情况登记
export function deleteTbTicketMicrocomputerById(data) {
  return request({
    url: `/signIn/deleteTbTicketMicrocomputerById/${data.id}`,
    method: "delete",
  });
}





// 查询纸质通行券使用情况明细列表
export function selectTbTicketPaperList(query) {
  return request({
    url: "/signIn/selectTbTicketPaperList",
    method: "get",
    params: query
  });
}

//    新增纸质通行券使用情况明细
export function insertTbTicketPaper(data) {
  return request({
    url: "/signIn/insertTbTicketPaper",
    method: "post",
    data: data,
  });
}
//   修改纸质通行券使用情况明细
export function updateTbTicketPaper(data) {
  return request({
    url: "/signIn/updateTbTicketPaper",
    method: "post",
    data: data,
  });
}
// 删除纸质通行券使用情况明细
export function deleteTbTicketPaperById(data) {
  return request({
    url: `/signIn/deleteTbTicketPaperById/${data.id}`,
    method: "delete",
  });
}


// 查询出口回收非正常CPC卡明细列表
export function selectTbTicketRecycleList(query) {
  return request({
    url: "/signIn/selectTbTicketRecycleList",
    method: "get",
    params: query
  });
}

//    新增出口回收非正常CPC卡明细
export function insertTbTicketRecycle(data) {
  return request({
    url: "/signIn/insertTbTicketRecycle",
    method: "post",
    data: data,
  });
}
//   修改出口回收非正常CPC卡明细
export function updateTbTicketRecycle(data) {
  return request({
    url: "/signIn/updateTbTicketRecycle",
    method: "post",
    data: data,
  });
}
// 删除出口回收非正常CPC卡明细
export function deleteTbTicketRecycleById(data) {
  return request({
    url: `/signIn/deleteTbTicketRecycleById/${data.id}`,
    method: "delete",
  });
}


// 查询CPC卡盈余卡回收登记列表
export function selectTbTicketSurplusList(query) {
  return request({
    url: "/signIn/selectTbTicketSurplusList",
    method: "get",
    params: query
  });
}

//    新增CPC卡盈余卡回收登记
export function insertTbTicketSurplus(data) {
  return request({
    url: "/signIn/insertTbTicketSurplus",
    method: "post",
    data: data,
  });
}
//   修改CPC卡盈余卡回收登记
export function updateTbTicketSurplus(data) {
  return request({
    url: "/signIn/updateTbTicketSurplus",
    method: "post",
    data: data,
  });
}
// 删除CPC卡盈余卡回收登记
export function deleteTbTicketSurplusById(data) {
  return request({
    url: `/signIn/deleteTbTicketSurplusById/${data.id}`,
    method: "delete",
  });
}


// 查询现金通行介质使用情况日清列表
export function selectTbTicketMediumList(query) {
  return request({
    url: "/signIn/selectTbTicketMediumList",
    method: "get",
    params: query
  });
}

//    新增现金通行介质使用情况日清
export function insertTbTicketMedium(data) {
  return request({
    url: "/signIn/insertTbTicketMedium",
    method: "post",
    data: data,
  });
}
//   修改现金通行介质使用情况日清
export function updateTbTicketMedium(data) {
  return request({
    url: "/signIn/updateTbTicketMedium",
    method: "post",
    data: data,
  });
}
// 删除现金通行介质使用情况日清
export function deleteTbTicketMediumById(data) {
  return request({
    url: `/signIn/deleteTbTicketMediumById/${data.id}`,
    method: "delete",
  });
}

// 鲜活
export function stationAgricultural(data) {
  return request({
    url: `/statistics/stationAgricultural`,
    method: "get",
    params: data,
  });
}

// 导出
export function generateExcelForm(query) {
  return request({
    url: `/statistics/generateExcelForm`,
    method: "get",
    params: query
  });
}

// 合计入口通行量统计
export function totalEnTrafficList(data) {
  return request({
    url: `/statistics/totalEnTrafficList`,
    method: "post",
    data: data,
  });
}


// 合计出口通行量统计
export function totalExTrafficList(data) {
  return request({
    url: `/statistics/totalExTrafficList`,
    method: "post",
    data: data,
  });
}


// 合计出口通行费统计
export function totalFeeList(data) {
  return request({
    url: `/statistics/totalFeeList`,
    method: "post",
    data: data,
  });
}






// 修改状态
export function editStatus(data) {
  return request({
    url: `/ticket/editStatus`,
    method: "post",
    data: data,
  });
}
// 新增免费车辆
export function freeCarAdd(data) {
  return request({
    url: `/freeCar/add`,
    method: "post",
    data: data,
  });
}

// 修改免费车辆
export function freeCarEdit(data) {
  return request({
    url: `/freeCar/edit`,
    method: "post",
    data: data,
  });
}
export function freeCarList(query) {
  return request({
    url: `/freeCar/list`,
    method: "get",
    params: query
  });
}

// 节假日查询
export function statementList(query) {
  return request({
    url: `/statement/list`,
    method: "get",
    params: query
  });
}

// 节假日编辑
export function statementEdit(data) {
  return request({
    url: `/statement/edit`,
    method: "post",
    data: data
  });
}
// 节假日请求日期(传开始时间和结束时间)
export function getStatementDate(query) {
  return request({
    url: `/statement/getDate`,
    method: "get",
    params: query
  });
}
// 提交下发日期
export function submitIssue(data) {
  return request({
    url: `/statement/issue`,
    method: "post",
    data
  });
}
// 节假日查询放假详情
export function getHolidayDate(query) {
  return request({
    url: `/statement/getHolidayDate`,
    method: "get",
    params: query
  });
}

// 节假日统计
export function getHolidayStatistics(data) {
  return request({
    url: `/statement/departmentHoliday`,
    method: "post",
   data
  });
}
  

// 补充数据类型
export function postSupplement(data) {
  return request({
    url: `/data/add`,
    method: "post",
    data: data
  });
}

export function getSupplementList(query) {
  return request({
    url: `/data/list`,
    method: "get",
    params: query
  });
}

export function getTotalList(query) {
  return request({
    url: `/freeCar/totalList`,
    method: "get",
    params: query
  });
}


export function getAnalysisReport(data) {
  return request({
    url: `/analysis/report`,
    method: "post",
    data: data
  });
}
export function etcRatio(data) {
  return request({
    url: `/statistics/etcRatio`,
    method: "post",
    data: data
  });
}

// 通行费排行
export function feeRanking(data) {
  return request({
    url: `/statistics/feeRanking`,
    method: "post",
    data: data
  });
}

//  车流量排行
export function numRanking(data) {
  return request({
    url: '/statistics/numRanking',
    method: 'post',
    data: data
  })
}

//  支付类型占比
export function payType(data) {
  return request({
    url: '/statistics/payType',
    method: 'post',
    data: data
  })
}


//  通行费客货占比
export function feeRate(data) {
  return request({
    url: '/statistics/feeRate',
    method: 'post',
    data: data
  })
}


//  出入口通行量客货占比

export function numRate(data) {
  return request({
    url: '/statistics/numRate',
    method: 'post',
    data: data
  })
}



//   收费站客单价排行
export function avgPrice(data) {
  return request({
    url: '/statistics/avgPrice',
    method: 'post',
    data: data
  })
}


//  收费站车型排行
export function vehicleRanking(data) {
  return request({
    url: '/statistics/vehicleRanking',
    method: 'post',
    data: data
  })
}

//  通行费量日均排行
export function dayRanking(data) {
  return request({
    url: '/statistics/dayRanking',
    method: 'post',
    data: data
  })
}


//  通行量费统计表
export function dailyTable(data) {
  return request({
    url: '/statistics/dailyTable',
    method: 'post',
    data: data
  })
}


//  收费运营分析
export function getAnalysis(query) {
  return request({
    url: '/analysis/list',
    method: 'get',
    params: query
  })
}

//  收费运营分析
export function addAnalysis(data) {
  return request({
    url: '/analysis',
    method: 'post',
    data: data
  })
}



//  收费运营分析
export function updateAnalysis(data) {
  return request({
    url: '/analysis',
    method: 'put',
    data: data
  })
}

//  修改日统计表
export function updateDaily(data) {
  return request({
    url: '/statistics/addDailyTable',
    method: 'post',
    data: data
  })
}





